home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / MacODBC / ODBC Tools / SampleSetup / MAKEFILE
Encoding:
Text File  |  1995-04-07  |  4.4 KB  |  154 lines  |  [TEXT/MPS ]

  1. # MAKEFILE
  2. # Build script for the 'ODBC Sample Setup' shared library (DLL).
  3. # Execute "Buildprogram All" from your MPW Worksheet. Make sure the Srcƒ,
  4. # Objƒ and other variables are set to the correct paths first, tho.
  5. # The variables CDefs, LibDefs and BSLDefs are intended to be set from the worksheet,
  6. # and can be used to add options to the MPW C, Lib and BuildSharedLibrary tools.
  7.  
  8. "Srcƒ"            =    :Sources:
  9. "Objƒ"            =    :Objects:
  10. "binƒ"                =    ::binaries:
  11.  
  12. ODBCLibs            =    ::LIB:
  13. ODBCincludes        =    ::INCLUDE:
  14. InternalLibs        =    ::InternalLibraries:
  15. InternalIncludes    =    ::InternalIncludes:
  16.  
  17. SampleSetupIncludes    =    -i "{ODBCincludes}"                                    ∂
  18.                         -i "{Srcƒ}"                                    ∂
  19.                         -i "{InternalIncludes}"
  20.  
  21. BSLIncludes            =    -i "{ODBCincludes}"                                    ∂
  22.                         -i "{Srcƒ}"                                    ∂
  23.  
  24. RezIncludes            =    -i "{ODBCincludes}"                                    ∂
  25.                         -i "{Srcƒ}"                                    ∂
  26.                         -i "{SLMInterfaces}Rincludes:"
  27.  
  28. COptions =                ∂
  29.                         -model far -r -b2 ∂
  30.                         -d MACODBC=1 -d PPCODBC=0 ∂
  31.                         {SampleSetupIncludes} -i "{SLMInterfaces}CIncludes:" ∂
  32.                         {CDefs}
  33.  
  34. PPCOptions            =    ∂
  35.                         -AppleExt On -char unsigned ∂
  36.                         -d MACODBC=1 -d PPCODBC=1 ∂
  37.                         {SampleSetupIncludes} ∂
  38.                         {PPCCDefs}
  39.  
  40. OBJECTS                =    ∂
  41. ##                        {Objƒ}DialogUtilities.c.o                    ∂
  42.                         {Objƒ}SampleSetup.c.o                    ∂
  43.                         {Objƒ}DBMSsetup.c.o
  44.  
  45. XOBJECTS            =    ∂
  46. ##                        {Objƒ}DialogUtilities.c.xo                    ∂
  47.                         {Objƒ}SampleSetup.c.xo                    ∂
  48.                         {Objƒ}DBMSsetup.c.xo
  49.  
  50. RezSources            =    {Srcƒ}SampleSetup.r
  51. RezXSources            =    {Srcƒ}SampleSetupPPC.r
  52.  
  53. #______ dependancies __________________________________________
  54.  
  55. all            ƒ    68k ppc
  56. 68k            ƒ    {binƒ}'ODBC Sample Setup'
  57. ppc            ƒ    {binƒ}'ODBC Sample Setup PPC'
  58.  
  59. clean        ƒ
  60.     echo >{Objƒ}jnk
  61.     delete -i    {Objƒ}≈                         ∂
  62.                 {binƒ}'ODBC Sample Setup'        ∂
  63.                 {binƒ}'ODBC Sample Setup PPC'
  64.  
  65. {Objƒ}        ƒ    {Srcƒ}
  66.  
  67. .c.o ƒ .c
  68.     echo -- C {DepDir}{Default}.c -o {Targ} {Coptions}
  69.     C {DepDir}{Default}.c -o {Targ} {Coptions}
  70.  
  71. .c.xo ƒ .c
  72.     echo -- ppcc {DepDir}{Default}.c -o {Targ} {PPCOptions}
  73.     ppcc {DepDir}{Default}.c -o {Targ} {PPCOptions}
  74.  
  75. #______ 68k build __________________________________________
  76.  
  77. "{Objƒ}"SampleSetup.o        ƒ    {OBJECTS} "{InternalLibs}"Utilities.o
  78.     echo -- Lib {targ}...
  79.     Lib {LibDefs} -o {Targ} {Deps}
  80.  
  81. "{Objƒ}SampleSetup.RSRC"    ƒ    "{Objƒ}"SampleSetup.o        ∂
  82.                                     "{Srcƒ}"SampleSetup.exp        ∂
  83.                                     "{ODBCLibs}"ODBCConfigMgr.cl.o
  84.     echo -- BuildSharedLibrary {targ}...
  85.     BuildSharedLibrary    {Objƒ}SampleSetup.o                        ∂
  86.         -obj    "{Objƒ}"SampleSetup                                ∂
  87.         -lib    {Targ}                                                ∂
  88.         -exp    "{Srcƒ}"SampleSetup.exp                            ∂
  89.     ##    -far    SampleSetup.cl.o                            ∂
  90.     ##    -near    SampleSetup.cln.o                            ∂
  91.         {BSLDefs} ∂
  92.         -symfile "{Objƒ}ODBC Sample Setup.SYM"        ∂
  93.         {BSLIncludes}                                                    ∂
  94.         {BSLDefs}                                                            ∂
  95.         "{ODBCLibs}ODBCConfigMgr.cl.o"                                ∂
  96.         "{SLMLibraries}LibraryManager.o"                            ∂
  97.         "{Libraries}Runtime.o"                                        ∂
  98.         "{Libraries}Interface.o"                                    ∂
  99.         "{CLibraries}StdCLib.o"
  100.  
  101. {binƒ}'ODBC Sample Setup'    ƒƒ    {RezSources}                                ∂
  102.                         "{Objƒ}"SampleSetup.RSRC
  103.     echo -- Rez {targ}...
  104.     rez -o {Targ} -t libr -c OMGR                                            ∂
  105.         -a -ov Types.r MPWTypes.r SysTypes.r                                ∂
  106.         {RezIncludes}                                                        ∂
  107.         {RezSources}
  108.     echo "INCLUDE ∂"{Objƒ}SampleSetup.RSRC∂";" | rez -a -o {Targ}
  109.  
  110. #______ ppc build __________________________________________
  111.  
  112. {Objƒ}SampleSetup.xcoff ƒ    {XOBJECTS} ∂
  113.                         "{InternalLibs}"Utilities.xo ∂
  114.                         "{ODBCLibs}"ODBCConfigMgr.xcoff ∂
  115.                         "{Srcƒ}"SampleSetup.x
  116.     echo -- PPCLink {targ}...
  117.     PPCLink -xm Sharedlibrary ∂
  118.             -export "`convertexportlist {Srcƒ}SampleSetup.x`" ∂
  119.             {PPCLinkDefs} ∂
  120.             -main SampleSetupMain ∂
  121.             {XOBJECTS} ∂
  122.             "{InternalLibs}"Utilities.xo ∂
  123.             "{ODBCLibs}"ODBCConfigMgr.xcoff ∂
  124.             "{PPCLibraries}"InterfaceLib.xcoff ∂
  125.             "{PPCLibraries}"MathLib.xcoff ∂
  126.             "{PPCLibraries}"StdCLib.xcoff ∂
  127.             "{PPCLibraries}"StdCRuntime.o ∂
  128.             "{PPCLibraries}"PPCCRuntime.o ∂
  129.             -o {Objƒ}SampleSetup.xcoff
  130.     setfile -c R2Db {Objƒ}SampleSetup.xcoff
  131.  
  132. {binƒ}'ODBC Sample Setup PPC' ƒƒ {Objƒ}SampleSetup.xcoff
  133.     echo -- MakePEF {targ}...
  134.     MakePEF {Deps} -o {Targ} ∂
  135.                     -l SampleSetup.xcoff=vsi:ODBC$SampleSetup ∂
  136.                     -l ODBCConfigMgr.xcoff=vsi:ODBC$ConfigMgr ∂
  137.                     -l InterfaceLib.xcoff=InterfaceLib ∂
  138.                     -l MathLib.xcoff=MathLib ∂
  139.                     -l StdCLib.xcoff=StdCLib ∂
  140.                     -ft 'shlb' -fc 'cfmg' ∂
  141.                     -i SampleSetupInit -t SampleSetupObit
  142.  
  143. {binƒ}'ODBC Sample Setup PPC' ƒƒ {RezSources} {RezXSources}
  144.     echo -- Rez {targ}...
  145.     rez -a -o {Targ}                ∂
  146.         Types.r MPWTypes.r SysTypes.r    ∂
  147.         balloontypes.r                            ∂
  148.         {RezIncludes}                            ∂
  149.         {RezSources} {RezXSources}
  150.  
  151.